<!DOCTYPE html>
<html>
<head>
    <title>API</title>
    <meta charset="utf-8">
    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../../styles/kendo.default.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.web.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    
        <div id="example" class="k-content">
            <div class="configuration" style="width: 220px">
                <span class="configHead">API Functions</span>
                <ul class="options">
                    <li>
                       <button id="get" class="k-button">Get value</button>
                   </li>
                   <li>
                       <input id="value" value="10/10/2000 12:00 AM" style="float:none" />
                       <button id="set" class="k-button">Set value</button>
                   </li>
                    <li>
						<button id="enable" class="k-button">Enable</button> or <button id="disable" class="k-button">Disable</button> or <button id="readonly" class="k-button">Readonly</button>
                    </li>
                    <li>
                        <button id="openDateView" class="k-button">Open</button> or <button id="closeDateView" class="k-button">Close</button> the date view
                    </li>
                    <li>
                        <button id="openTimeView" class="k-button">Open</button> or <button id="closeTimeView" class="k-button">Close</button> the time view
                    </li>
                </ul>
           </div>
            <div class="demo-section">
                <input id="datetimepicker" />
            </div>


            <script>
                $(document).ready(function() {
                    $("#datetimepicker").kendoDateTimePicker()
                                  .closest(".k-widget")
                                  .attr("id", "datetimepicker_wrapper");

                    var datetimepicker = $("#datetimepicker").data("kendoDateTimePicker");

                    var setValue = function () {
                        datetimepicker.value($("#value").val());
                    };

                    $("#enable").click(function() {
                        datetimepicker.enable();
                    });

                    $("#disable").click(function() {
                        datetimepicker.enable(false);
                    });

                    $("#readonly").click(function() {
                        datetimepicker.readonly();
                    });

                    $("#openDateView").click(function() {
                        datetimepicker.open("date");
                    });

                    $("#openTimeView").click(function() {
                        datetimepicker.open("time");
                    });

                    $("#closeDateView").click(function() {
                        datetimepicker.close("date");
                    });

                    $("#closeTimeView").click(function() {
                        datetimepicker.close("time");
                    });

                    $("#value").kendoDateTimePicker({
                        change: setValue
                    });

                    $("#set").click(setValue);

                    $("#get").click(function() {
                        alert(datetimepicker.value());
                    });
                });
           </script>

            <style scoped>
                .demo-section {
                    margin-right: 375px;
                    width: 185px;
                }
            </style>
        </div>

	
			
</body>
</html>
